package org.app.format;

import org.app.PortStatus;
import org.app.Ports;

public enum EnumXML implements PortStatus{

	STRING("%s"),
	NUMBER("%s"),
	ARRAYS("<list class='%s'>%s</list>"),//MessageFormat 格式化输出‘ 原样输出符为’
	PARALLEL("%s\n"),
	MAPS("<map class='%s'>%s</map>"),
	
	//MAP(" %s='%s' ")
	MAP("<{0}>{1}</{0}>");
	public String value="";
	EnumXML(String value){
		this.value=value;
	}
	
	public String execute(Object... obj) {
		// TODO Auto-generated method stub
		return String.format(value, obj);
	}

	@Override
	public PortStatus changeTo(String staus) {
		// TODO Auto-generated method stub
		return Enum.valueOf(EnumXML.class,staus);
	}

	
}
